package com.yanqu.road.entity.log.cross.sonhai;

import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.log.ServerBaseLog;
import com.yanqu.road.entity.log.maidian.BaseLogEntity;

@FieldTypeAnnotation(tableName = "t_l_ck_son_hai_energy", desc = "山海伏兽-体力日志", autoSave = true, dataUpload = true, eventName = "mountsea_use", uploadCk = true, isCross = true)
public class LogCrossSonHaiEnergy extends ServerBaseLog {

    @FieldTypeAnnotation(desc = "活动ID", dataAttribute = "activityId", isIndex = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "分组ID", dataAttribute = "group_id", isIndex = true)
    private int groupId;

    @FieldTypeAnnotation(desc = "用户id", isIndex = true)
    private long userId;

    @FieldTypeAnnotation(desc = "队伍id", dataAttribute = "mountsea_team")
    private int teamId;

    @FieldTypeAnnotation(desc = "类型，1：消耗，2：道具恢复，3：系统恢复，4：事件恢复", dataAttribute = "mountsea_usetype")
    private int type;

    @FieldTypeAnnotation(desc = "消耗体力", dataAttribute = "mountsea_usephy")
    private int costEnergy;

    @FieldTypeAnnotation(desc = "当前体力值", dataAttribute = "mountsea_nowphy")
    private int currentEnergy;

    public LogCrossSonHaiEnergy(int activityId, int groupId, long userId, int teamId, int type, int costEnergy, int currentEnergy) {
        this.activityId = activityId;
        this.groupId = groupId;
        this.userId = userId;
        this.teamId = teamId;
        this.type = type;
        this.costEnergy = costEnergy;
        this.currentEnergy = currentEnergy;
    }

    @Override
    public long getUserId() {
        return userId;
    }

}
